﻿<style>
    .notciecell {
        width: 100%;
        display: flex;
        align-items: center;
        flex-direction: row;
        height: 40px;
        border-bottom: 1px solid #eee;
        justify-content: space-between;
        cursor: pointer;
    }

    .noticetitle {
        font-size: 14px;
    }

    .noticetip {
        font-size: 12px;
    }

    .noticeleft {
        display: flex;
        align-items: center;
        flex-direction: row;
        height: 40px;
        padding-left: 10px;
    }

    .noticeright {
        display: flex;
        align-items: center;
        flex-direction: row;
        height: 40px;
        padding-right: 10px;
    }

    .noticeindex {
        padding-right: 10px;
    }
</style>
<div class="cellheadcontainer">
    <span class="celltitletext">{{elementtitle}}</span>
    <div class="celltitleop">
        <a style="color:white" class="morebtn" onclick="OpenMore('{{elementmoreurl}}')">更多</a>
    </div>
</div>
<div class="cellcontentcontainer">
    {{#data}}
    <div class="notciecell" onclick="OpenDetail('{{title}}')">
        <div class="noticeleft">
            <span class="noticetitle noticeindex">{{index}}</span>
            <span class="noticetitle">{{title}}</span>
        </div>
        <div class="noticeright">
            <span class="noticetip">{{publishuname}}</span>&nbsp;
            <span class="noticetip">{{publishdate}}</span>
        </div>
    </div>
    {{/data}}
</div>
<script>
    var noticeid = "{{elementid}}";
    function OpenMore(url) {
        OpenTopDialog('noticlelist', '消息通知列表', url, 600, 800, BindNotcieList)
    }
    function BindNotcieList() {
        CommonRefresh(noticeid);
    }
    function OpenDetail(title) {
        OpenTopDialog('noticledetail', '消息详情', "Frame/Demo/NoticeDetail", 600, 800, BindNotcieList, title)
    }
</script>